The present invention relates to an image reading apparatus and shading correction data acquiring method and, more particularly, to an image reading apparatus for reading a shading correction plate (in general, a white reference plate having a reference density) which has a uniform reference density and extends in the main scan direction, by using a line sensor constituted by a plurality of photoelectric conversion elements one-dimensionally aligned in the main scan direction, creating and storing shading correction data on the basis of an output from each photoelectric conversion element, and shading-correcting, by using the shading correction data, data of an original image that is read by each photoelectric conversion element, a shading correction method applied to the image reading apparatus, and a storage medium which stores a program for executing the shading correction method.
FIGS. 1 and 2 are a side sectional view and perspective view, respectively, showing the schematic arrangement of a general image reading apparatus.
An original cover holding an original 12 is set on a platen 10. The original 12 is irradiated from its lower side with light emitted by a light source 15. The light reflected by the original 12 enters a line sensor 20 via a lens 14. The line sensor 20 has photoelectric conversion elements (CCDs) one-dimensionally aligned in the main scan direction. Each CCD converts the received light into an electrical signal, thereby obtaining electrical signals corresponding to an image (for one scan line) of the original 12 in the main scan direction.
After the original is read by one scan line, a motor 62 moves a reading unit 13 by one scan line in a direction (subscan direction) indicated by the arrow X in FIG. 2. Then, an image of the next scan line is similarly read. This operation is repeated to read the entire original 12.
An image signal read by the line sensor 20 is influenced by variations in the sensitivities of the CCDs, variations in dark current, and irregularities in light quantity from an optical system. As for x CCDs which constitute the line sensor 20, the light quantity of the light source 15 and an output from each CCD have a relationship as shown in FIG. 3A. That is, input/output characteristics are different between the CCDs. To eliminate these influences and make the input/output characteristics of all the x CCDs coincide with each other, as shown in FIG. 3B, CCD output correction (called xe2x80x9cshading correctionxe2x80x9d) is done.
Shading correction is performed as follows.
The motor 62 moves the reading unit 13 to a position (to be referred to as a xe2x80x9chome positionxe2x80x9d hereinafter) where a shading correction plate (reference white plate) 11 attached to the end of the platen 10 is read. At this position, an output from each CCD of the line sensor 20 when the light source 15 is turned on to irradiate the shading correction plate 11 is stored as correction data W(n). (n) means the nth CCD. Then, an output from each CCD of the line sensor 20 when the light source 15 is turned off (or light is shielded) is stored as correction data B(n).
When an image of the original 12 is read next time, these correction data are read out, and shading correction is performed for each CCD by
SD(n)=k(n)xc2x7[(S(n)xe2x88x92B(n)]/[(W(n)xe2x88x92B(n)]
where S(n) is the output data from the nth CCD, B(n) is the correction data of the nth CCD when the light source 15 is OFF (to be referred to as OFF correction data of the nth CCD hereinafter), W(n) is the correction data of the nth CCD when the light source 15 is ON (to be referred to as ON correction data of the nth CCD hereinafter), k(n) is the coefficient of the nth CCD, and SD(n) is the shading-corrected data for the output data from the nth CCD.
FIG. 4 is a block diagram showing the peripheral arrangement of a shading correction circuit.
An A/D converter 32 converts an analog signal output from the nth CCD of the line sensor 20 into a digital value S(n) via an amplifier 31. In a shading correction circuit 33, a subtracter 34 subtracts OFF correction data B(n) of the nth CCD from the digital output value S(n) of the nth CCD, and a multiplier 35 multiplies the difference by shading correction data ShC(n) to obtain shading-corrected data SD(n). The shading correction data ShC(n) is given by k(n)/[W(n)xe2x88x92B(n)].
OFF correction data B(n), ON correction data W(n), shading correction data ShC(n), and the like change for each pixel of the CCD, so that correction in the shading correction circuit 33 is executed for each pixel of the line sensor.
In this manner, output variations between CCDs are corrected, and the original 12 is more faithfully read.
The conventional shading correction method, however, suffers the following problem.
Dirt or dust attached to the shading correction plate 11 makes ON correction data W(n) erroneous. At a portion where a defect such as dirt or dust exists on the shading correction plate 11, this defect decreases the output level of the CCD. If shading correction is performed by using ON correction data W(n) obtained from the CCD corresponding to the defect portion of the shading correction plate 11, an output from that CCD is excessively corrected, and a stripe is formed on the read image.
For example, assume that dirt 21 is attached to the shading correction plate 11, as shown in FIG. 5A. ON correction data W(n) obtained by reading the shading correction plate 11 decreases in level at a position xcex2 under the influence of the dirt 21, as represented by a curve 501. Shading correction is done by using this ON correction data W(n) so as to make corrected data SD(n) flat (ideal value) at the positions of all the CCDs, as shown in FIG. 5B. Hence, shading correction data ShC(n) has an irregular portion xcex3, as represented by a curve 502 in FIG. 5A.
If a uniform-density original is read, each CCD outputs output data S(n) as represented by a curve 601 in FIG. 6. The output data S(n) is shading-corrected by multiplying it by shading correction data ShC(n) represented by the curve 502 (the same data as the curve 502 in FIG. 5A). The obtained shading-corrected data SD(n) has a projection xcex4, as represented by a line 603.
In other words, the irregular portion xcex4 is generated on the shading-corrected data SD(n) under the influence of the excessively corrected portion (projection xcex3 of the curve 502 of FIG. 6) of the shading correction data ShC(n) due to the dirt 21. The irregular portion 6 appears as a stripe of the read image.
To solve this problem, there is provided a method of reading a shading correction plate before image reading to create shading correction data, reading the shading correction plate at another position after displacement in the subscan direction, performing shading correction by using the shading correction data, and detecting from this result the presence/absence of defects of the shading correction plate at the portion where the shading correction plate is first read. If a defect exists, the reading portion is displaced in the subscan direction to search for a nondefective portion and shading correction data is created there. If no nondefective portion is found, shading correction data is created at a portion having fewest defects.
However, the following problems occur in the conventional shading correction using the method of reading the shading correction plate at another position displaced in the subscan direction.
(1) The operation is performed every time before image reading, so image reading takes a long time.
(2) Strict quality management of reducing defects on the shading correction plate is required on the assumption that the shading correction plate has a position free from any dirt in the subscan direction.
(3) When no nondefective position is found in the subscan direction on the shading correction plate, shading correction data is created at a portion having fewest defects. Hence, the influence of the defects inevitably appears on the image.
The present invention has been made in consideration of the above situation, and has as its object to provide an image reading apparatus for detecting defects such as dirt on a shading correction plate and removing the influence of the defects, a shading correction method, and a storage medium.
According to the present invention, the foregoing object is attained by providing an image reading apparatus comprising a line sensor, control means for controlling a reading position by the line sensor, a reference density member, average data acquiring means for acquiring average shading data on the basis of image data obtained by reading the reference density member by the line sensor at a plurality of positions in a subscan direction, and specifying means for specifying a defect position of the reference density member on the basis of the average shading data and image data obtained by reading the reference density member at a predetermined position.
According to the present invention, the foregoing object is also attained by providing a shading correction data acquiring method in an image reading apparatus having a line sensor, control means for controlling a reading position by the line sensor, and a reference density member, comprising an average data acquiring step of acquiring average shading data on the basis of image data obtained by reading the reference density member by the line sensor at a plurality of positions, and a specifying step of specifying a defect position of the reference density member on the basis of the average shading data and image data obtained by reading the reference density member at a predetermined position.
Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof.